﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BestBuy
{
    public partial class PageLogOut : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["TenDN"] = "";
            Session["LoaiTK"] = "";
            Session["IDDN"] = "";
            if (!IsPostBack)
            {
                if (Request.UrlReferrer != null && !Request.UrlReferrer.PathAndQuery.Equals("/PageGuest/PageRegister.aspx"))
                {
                    this.ViewState["returnurl1"] = Request.UrlReferrer.PathAndQuery;
                }
                else
                {
                    this.ViewState["returnurl1"] = "/";
                }
            }
        }

        protected void lbtnBlack_Click(object sender, EventArgs e)
        {
            string DuongDan = this.ViewState["returnurl1"].ToString();
            Response.Redirect(DuongDan);
        }
    }
}